#include <iostream>
#include <math.h>
#include "Implement_bai9_02.h"

#define  PI (float)2.0*asin(1.0);

using namespace std;

Circle::Circle(float r):radius(r){ }
Circle::Circle(Point o, float r):O(o), radius(r){ }
float Circle::Calcval(){
	return radius*radius*PI;
}

void Circle::showCircle(){
	cout<<"Circle have radius is : "<<radius<<" and have area is : "<<Calcval()<<endl;
}

Cylinder::Cylinder(float r, float len): Circle(r), length(len){ };
float Cylinder::Calcval(){
	return Circle::Calcval() * length;
}

void Cylinder::showCylinder(){
	cout<<"Cylinder have radius is : "<<radius<<" and have area is : "<<Calcval()<<endl;
}

Sphere::Sphere(float r) : Circle(r) { }

float Sphere::Calcval(){
	return Circle::Calcval()*radius*4/3;
}

void Sphere::showSphere(){
	cout<<"Sphere have radius is : "<<radius<<" and have area is : "<<Calcval()<<endl;
}